<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> 
<%

	String pageNoStr = request.getParameter("page");
	String ard=request.getParameter("ard");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     <link href="plug-in/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet"> 
    <script type="text/javascript" src="plug-in/umeditor/third-party/jquery.min.js"></script> 
    <script type="text/javascript" charset="utf-8" src="plug-in/umeditor/umeditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="plug-in/umeditor/umeditor.min.js"></script>
    <script type="text/javascript" src="plug-in/umeditor/lang/zh-cn/zh-cn.js"></script>
	<script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js?skin=metrole"></script> 
    <script type="text/javascript" src="js/common.js"></script>
	<link rel="stylesheet" href="css/index.css">
	<link rel="stylesheet" href="css/style_1_common.css">
	<link rel="stylesheet" href="css/umeditor_css.css"> 
    <link href="plug-in/jquery-ui/js/jquery-ui.min.css?v=1" type="text/css" rel="stylesheet">  
    <script type="text/javascript"src="plug-in/jquery-ui/js/jquery-ui.min.js?v=2"></script>
<title>群组文章</title>
</head>
<!--头部 -->
	<%@include file="head.jsp"%> 
    <div id="alertMessage"></div>
<div style="width: 100%; height: auto; background: #f8f8f8; padding-bottom: 10px;"> 
	<div style="width: 960px; margin: 0 auto; color: #666; padding-top: 10px; padding-bottom: 10px">
		<img style="vertical-align: sub" src="imges/fangzi.png"> > <span> <a href="<%=request.getContextPath() + "/indexController.do?group"%>">群组</a>>
			<a href="groupController.do?groupList&gid=${groupLink.group_parent_id }">${groupLink.group_parent_name }</a>> 
			<a href="groupController.do?groupList&gid=${groupLink.group_son_id }">${groupLink.group_son_name }</a>> 
			<a href="groupController.do?groupDetail&sid=${groupLink.id }">${groupLink.group_name }</a>>
			${article.title}
		</span>
	</div>
	
	<div id="pgt" class="cl">
		<div class="pgt">
			<div class="pgt_img">
				<img src="imges/fatie.jpg">
			</div>
			<div class="pg">
				<%
					int pageNo = 0, bfNo = 0;
					if (StringUtil.isEmpty(pageNoStr) || "1".equals(pageNoStr)) {
						pageNo = 1;
						bfNo = 1;
					} else {
						pageNo = Integer.parseInt(pageNoStr);
						bfNo = pageNo - 1;
					}
					String annCount = request.getAttribute("pageCount").toString();
					int P_pageCount = Integer.parseInt(annCount);
				%>  
				<span class="pgb"><a href="groupController.do?thread&ard=<%=ard%>&page=<%=bfNo%>">返回</a></span>
				<%
					int showPages = 10;//显示10页
					if (showPages >= P_pageCount) {
						for (int i = 0; i < P_pageCount; i++) {
				%>
							<a class="<%=pageNo == (i + 1) ? "current" : ""%>" href="groupController.do?thread&ard=<%=ard%>&page=<%=(i + 1)%>"><%=(i + 1)%></a>
				<%
						} 
					} else {
						int pindex = 0;
						if (pageNo > (showPages / 2))
							pindex = pageNo - (showPages / 2);
						if ((pageNo > P_pageCount - (showPages / 2)) && (pageNo <= P_pageCount))
							pindex = P_pageCount - showPages;
						for (int i = pindex; i < showPages + pindex; i++) {
				%>
						<a class="<%=pageNo == (i + 1) ? "current" : ""%>" href="groupController.do?thread&ard=<%=ard%>&page=<%=(i + 1)%>"><%=(i + 1)%></a>
				<%}%>
					<a href="groupController.do?thread&ard=<%=ard%>&page=<%=P_pageCount %>" class="last">... <%=P_pageCount %></a> 
				<%}%> 
				<label>
					<input type="text" name="custompage" class="px" size="2" title="输入页码，按回车快速跳转" value="1">
					<span title="共 <%=P_pageCount %>页"> / <%=P_pageCount %>页</span>
				</label> 
				<a href="groupController.do?thread&ard=<%=ard %>&page=<%=(pageNo + 1)%>" class="nxt">下一页</a> 
			</div>
		</div>
	</div>
	
	<div class="yxyj">
		<div class="yxyj_l_t">
			<div class="yxyj_l_t_left">
				<div style="float: left; margin-top: 17px; margin-left: 30px;">
					<span>查看：</span><span style="color: #ff6600">${article.viewAccount}</span>
				</div>
				<div style="width: 1px; height: 30px; background: #f1f1f1; margin: auto; margin-top: 10px"></div>
				<div style="float: right; margin-right: 30px; margin-top: -23px;">
					<span>回复：</span><span style="color: #ff6600">${article.replyAccount}</span>
				</div>
			</div>
			<div class="yxyj_l_t_right">
				<div style="float: left; margin-left: 15px; margin-top: 18px">
					<span style="font-weight: bold; color: #000; font-size: 16px" id="span_article_title">【${article.title}】</span> <span style="font-size: 16px">[复制链接]</span>
				</div>
				<div style="float: right; margin-right: 15px; margin-top: 15px;">
					<img src="imges/zuoyou.jpg">
				</div>
			</div>
		</div>  
		<input type="hidden" id="group_sid" name="group_sid" value="${groupLink.group_son_id }">
		<input type="hidden" id="group_id" name="group_id" value="${groupLink.group_id }">
		<input type="hidden" id="art_id" name="art_id" value="${article.id }">
		<c:forEach items="${articles}" var="item" varStatus="status">
			<div class="yxyj_l_content">
			
			   <c:if test="${item.is_recommend==1}">
			   	   <div id="threadstamp"><img src="imges/006.gif" title="推荐"></div>
			   </c:if>
			   <c:if test="${item.is_new==1}">
			   	   <div id="threadstamp"><img src="imges/002.gif" title="最新"></div>
			   </c:if>
			   <c:if test="${item.is_up==1}">
			   	   <div id="threadstamp"><img src="imges/005.gif" title="置顶"></div>
			   </c:if>
			   <table class="plhin" cellspacing="0" cellpadding="0" id="plhin_${item.id }">
			    <tbody><tr>
			     <td class="pls" rowspan="2">
			        <div class="pi"><a href="" class="xw1">${item.user_name }</a> <img src="imges/v1.jpg" style=" vertical-align:middle"></div>
			        <div class="avatar"><a href="" class="avtm"><img src="imges/touxiang.png"></a></div>
			          <div class="tns xg2">
			           <table cellspacing="0" cellpadding="0" width="100%">
			             <tbody>
			               <tr>
			                <th><p><a href="" class="xi3">${item.release_num }</a></p>主题</th>
			                <th><p><a href="" class="xi3">${item.comments_num }</a></p>帖子</th>
			                <td><p><a href="" class="xi3">${item.integral }</a></p>积分</td>
			               </tr>
			             </tbody>
			           </table>
			          </div>
			        <p><em><a href="">功勋管理员</a></em></p>
			        <p>
			          <span>
			           <img src="imges/star_level3.gif"><img src="imges/star_level3.gif"><img src="imges/star_level3.gif">
			           <img src="imges/star_level3.gif"><img src="imges/star_level2.gif"><img src="imges/star_level1.gif">
			          </span>
			        </p>
			        <p><span class="pbg2"><span class="pbr2" style="width:16%;"></span></span></p>
			        <dl class="pil cl">
			        	<dt>积分</dt><dd>${item.integral }</dd>
			        	<dt>威望</dt><dd>${item.prestige } 点</dd>
			        	<dt>魅力</dt><dd>${item.charm } 点</dd>
			        	<dt>贡献</dt><dd>${item.contrbute } 点</dd>
			            <dt>易币</dt><dd>${item.lunbi } 元</dd>
			            <dt><img style="vertical-align:middle" src="imges/jindou.gif"> 金豆</dt><dd>${item.jindou } 枚</dd>
			            <dt><img style="vertical-align:middle" src="imges/money.gif"> 现金</dt><dd>${item.cash } 元</dd>  
			        </dl>
			        <p class="md_ctrl">
			          <a href=""><img src="imges/medal2.gif"><img src="imges/medal3.gif"><img src="imges/medal9.gif">
			          <img src="imges/medal11.gif"><img src="imges/medal12.gif"><img src="imges/boy.gif"><br>
			          <img src="imges/jxry.gif"></a>
			        </p>
			       <ul class="xl xl2 o cl"><li class="pm2"><a href="#">发消息</a></li></ul>
			     </td>
			     
			     <c:set var="lc_index" scope="session" value="${(status.index+1)+page*10}"/> 
			     <td class="plc">
			        <div class="pi">
			          <strong><a href="">${lc_index==1 ? "楼主" : lc_index==2 ? "沙发" : lc_index==3 ? "板凳" : lc_index==4 ? "地板" : lc_index}${lc_index>=5 ? "楼" : "" }</a></strong>
			         <div class="pti">
			           <div class="pdbt"></div>
			           <div style="float:left">
			             <img src="imges/ico_lz.png" class="authicn vm"><span id="span_article_username_${item.id }">${item.user_name }</span><span class="pipe">|</span><em>发表于<span id="span_article_createdate_${item.id }">${item.create_date}</span></em>
			             <span class="pipe">|</span><a href="groupController.do?thread&ard=<%=ard %>&page=<%=bfNo%>&authorid=${item.user_id}">只看该作者</a>
			           </div>
			         </div>
			       </div>
			       <div class="pct">
			         <div class="a_pt"><a href=""><font color="#FF0000">[普劝称赞圣号]</font><font color="#FF6600"><b>南无宝月智严光!</b></font></a></div>
			        <div class="pcb">
			         <div class="t_fsz">
			           <table cellspacing="0" cellpadding="0" width="100%">
			             <tbody>
			              <tr>
			               <td class="t_f">
			                 <div class="a_pr"><a href=""><img src="imges/200928gvhzhgnmzfagf0zo.jpg" height="600" width="160" border="0"></a></div>
			                 <div id="div_article_content_${item.id }">
				                 	${item.content}
			                 </div>
			               </td>
			              </tr>
			             </tbody>
			            </table>
			             <c:if test="${lc_index==1}">
			             	<c:if test="${item.is_recommend==1 }">
			            		<div class="modact"><a href="" title="帖子模式">本主题由 ${item.user_name } 于 ${item.update_date } 推荐</a></div> 
			            	</c:if>
			             	<c:if test="${item.is_new==1 }">
			            		<div class="modact"><a href="" title="帖子模式">本主题由 ${item.user_name } 于 ${item.update_date } 最新</a></div> 
			            	</c:if>
			             	<c:if test="${item.is_up==1 }">
			            		<div class="modact"><a href="" title="帖子模式">本主题由 ${item.user_name } 于 ${item.update_date } 置顶</a></div> 
			            	</c:if>
			             	<c:if test="${item.is_close==1 }">
			            		<div class="modact"><a href="" title="帖子模式">本主题由 ${item.user_name } 于 ${item.update_date } 关闭</a></div> 
			            	</c:if>
			             	<c:if test="${item.is_zambia==1 }">
			            		<div class="modact"><a href="" title="帖子模式">本主题由 ${item.user_name } 于 ${item.update_date } 赞</a></div> 
			            	</c:if>
			            </c:if>
			          </div>
			           <!-- 只有楼主才有 -->
			           <c:if test="${lc_index==1}">
			            <div id="vfastpost" class="fullvfastpost">				
			              <input type="hidden" name="formhash" value="bf362f97">
			               <table cellspacing="0" cellpadding="0">
			                <tbody><tr>
			                 <td id="vf_l"></td>
			                 <td id="vf_m" style="vertical-align: middle;">
			                 	<input type="text" name="message" id="vmessage" style="color: rgb(205, 205, 205);"></td>
			                 <td id="vf_r"></td>						
			                 <td id="vf_b">
			                 <button type="submit" class="pn pnc" name="replysubmit" id="replysubmit" onclick="qkreplay('${item.id}',${item.user_id })" value="true" style="">快速回复</button>								
			                 </td>						
			               </tr>
			              </tbody></table>				
			            </div>
				        </c:if>
				       <!-- 只有楼主才有 -->
				        <c:set var="pf" scope="session" value="${pflist}"/> 
				       	<c:set var="v_jy" scope="session" value="0"/> 
				       	<c:set var="v_ww" scope="session" value="0"/>
				       	<c:set var="v_ml" scope="session" value="0"/>
				       	<c:set var="v_gx" scope="session" value="0"/>
				       	<c:set var="v_jd" scope="session" value="0"/>  
				       <%
				       		int cyrs=0,jy=0,ww=0,ml=0,gx=0,jd=0,pfcount=0;
				       %>
				       <c:forEach items="${pflist}" var="pf" varStatus="pfIndex">
				       		<c:if test="${pf.article_id eq item.id }">
				       			<c:set var="v_jy" scope="session" value="${v_jy+pf.experience}"/> 
				       			<c:set var="v_ww" scope="session" value="${v_ww+pf.prestige}"/>
				       			<c:set var="v_ml" scope="session" value="${v_ml+pf.charm}"/>
				       			<c:set var="v_gx" scope="session" value="${v_gx+pf.contribution}"/>
				       			<c:set var="v_jd" scope="session" value="${v_jd+pf.jindou}"/> 
				       			<%
				       				cyrs=cyrs+1;
				       				pfcount=pfcount+1;
				       			%>
				       		</c:if>
				       </c:forEach> 
				       <div class="cls_pf_${item.id }">
				       <%  if(cyrs>0){%>
				          <h3 class="psth xs1"><span class="icon_ring vm"></span>评分</h3>
				          <dl class="rate">
				           <dd style="margin:0"> 
				             <table class="ratl">
				              <tbody>
				              <tr>
				               <th class="xw1" width="120">参与人数 <span class="xi1"><%=pfcount %></span></th>
				               <th class="xw1" width="70">经验 <i><span class="xi1">+${v_jy }</span></i></th>
				               <th class="xw1" width="70">威望 <i><span class="xi1">+${v_ww }</span></i></th>
				               <th class="xw1" width="70">魅力 <i><span class="xi1">+${v_ml }</span></i></th>
				               <th class="xw1" width="70">贡献 <i><span class="xi1">+${v_gx }</span></i></th>
				               <th class="xw1" width="70">金豆 <i><span class="xi1">+${v_jd }</span></i></th>
				               <th width="200"><i class="txt_h">理由</i></th>
				             </tr>
				             </tbody>
				             <tbody class="ratl_l">
						       	<%
						       		int spfcount=0;
						       	%>
						       <c:forEach items="${pflist}" var="pf2" varStatus="pfIndex">
						       		<c:if test="${pf2.article_id eq item.id }">
						       		   <% 
						       		   		spfcount=spfcount+1;
						       		   		if(spfcount<5){
						       		   %>
						               <tr id="rate_${item.user_id }_${item.id}">
						                <td><a href=""><img src="imges/56_avatar_small.jpg"></a> <a href="">${pf2.user_name }</a></td>
						                <td class="xi1">${pf2.experience>0 ? "+" : "" }${pf2.experience>0 ? pf2.experience : "" }</td>
						                <td class="xg1">${pf2.prestige>0 ? "+" : "" }${pf2.prestige>0 ? pf2.prestige : "" }</td>
						                <td class="xg1">${pf2.charm>0 ? "+" : "" }${pf2.charm>0 ? pf2.charm : "" }</td>
						                <td class="xg1">${pf2.contribution>0 ? "+" : "" }${pf2.contribution>0 ? pf2.contribution : "" }</td>
						                <td class="xg1">${pf2.jindou>0 ? "+" : "" }${pf2.jindou>0 ? pf2.jindou : "" }</td>
						                <td class="xg1">${pf2.reason }</td>
						              </tr>
						              <%} %>
						            </c:if>
				        		</c:forEach>
				            </tbody>
				          </table>
				          	<% if(pfcount>5){ %>
				            	<p class="ratc"><a href="javascript:showAllPf('${item.id }')" title="查看全部评分">查看全部评分</a></p>
				            <%} %>
				          </dd>
				         </dl>
				         <%} %>
				        </div>
			        </div>
			      </div>
			    </td></tr>
			   
			    <tr>
			      <td class="plc plm">
			      
			        <!-- 只有楼主才有 -->
			       <c:if test="${lc_index==1}">
			       <div id="p_btn" class="mtw mbm hm cl" style="padding-top:0px;padding-bottom:5px;">
			        <div class="tshare cl">
			         <b>分享到:&nbsp;</b>
			          <a href="" title="QQ好友和群"><i><img src="imges/qq_share.png">QQ好友和群</i></a>
			          <a href="" title="腾讯微博"><i><img src="imges/weibo.png" alt="腾讯微博">腾讯微博</i></a>
			          <a href="" title="QQ空间"><i><img src="imges/qzone.gif" alt="QQ空间">QQ空间</i></a>
			          <a href=""><i><img src="imges/share.png" alt="微信">微信</i></a>
			        </div>
			         <a href="javascript:replayZc('keep','${item.id }',${item.user_id })" title="${item.keep_account } 人收藏"><i><img src="imges/fav.gif" alt="收藏">收藏<span id="sp_keep_num_${item.id }"> 0</span></i></a>
			         <a href="javascript:replayPfWin('${item.id }',${item.user_id })" title="评分表立场"><i><img src="imges/agree.gif" alt="评分">评分</i></a>
			         <a class="sharep" href="" title="分享推精华"><i><img src="imges/oshr.png" alt="分享">分享</i></a>
			         <a href="" title=""><i><img src="imges/collection.png" alt="分享">淘帖<span style="display:none">0</span></i></a>
			         <a href="javascript:replayZc('support','${item.id }',${item.user_id })" title="支持"><i><img src="imges/rec_add.gif">支持<span id="sp_support_num_${item.id }"> 0</span></i></a>
			         <a href="javascript:replayZc('against','${item.id }',${item.user_id })" title="反对 "><i><img src="imges/rec_subtract.gif" alt="反对">反对<span id="sp_against_num_${item.id }"> 0</span></i></a>
			      </div> 
			      </c:if>
			      <!-- 只有楼主才有 -->
			      
			      <div class="sign" style="max-height:100px;maxHeightIE:100px;">
			        <font color="Red"><strong>职业...算命...风水...起名...择日...解灾.............QQ：1532312074</strong></font>
			      </div> 
			      <div class="a_pb">
			       <a href=""><font color="#FF0000">[普劝称赞圣号]</font><font color="#FF6600"><b>南无极乐世界阿弥陀佛！</b></font></a>
			      </div>
			      </td>
			    </tr>
			   <tr> </tr>
			   <tr>
			     <td class="pls"></td>
			      <td class="plc" style="overflow:visible;">
			       <div class="po hin">
			        <div class="pob cl">
			         <em>
			         	<a class="fastre" href="javascript:replayWin('${item.id }',${item.user_id })">回复</a>
			         	<c:if test="${lc_index>1}">
				         	<a class="replyadd" href="javascript:replayZc('support','${item.id }',${item.user_id })">支持 <label id="sp_support_num_${item.id }">${item.support_account }</label></a>
				         	<a class="replysubtract" href="javascript:replayZc('against','${item.id }',${item.user_id })">反对 <label id="sp_against_num_${item.id }">${item.oppose_account }</label></a>
			        	</c:if>
			         </em>
			         <span><select class="showmenu"><option>使用道具</option><option>使用道具1</option><option>使用道具2</option></select>
			         	<c:if test="${lc_index>1}">
			         		<a href="javascript:replayPfWin('${item.id }',${item.user_id })">评分</a>
			         	</c:if>
			         	<a href="javascript:replayJubao('${item.id }',${item.user_id })">举报</a>
			         </span>
			        </div>
			       </div>
			     </td>
			   </tr>
			  </tbody>
			</table>
			</div>
		</c:forEach>
			<div id="postlistreply" class="pl">
				<div id="post_new" class="viewthread_table" style="display: none"></div>
			</div>
		<div style="clear: both"></div> 
	</div>
	<!-- 》》》》》》》》》》》》》》》》》》》 分  页 《《《《《《《《《《《《《《《《《《《《《《《《《  -->
	<div id="pgt" class="pgs mbm cl " style="margin-top: 5px;">
		<div class="pgt" >
			<div class="pgt_img">
				<a href="#" style="border: none">
					<img src="imges/fatie.jpg">
				</a>
			</div>
			<div class="pg"> 
				<span class="pgb"><a href="groupController.do?thread&ard=<%=ard%>&page=<%=bfNo%>">返回</a></span>
				<% 
					if (showPages >= P_pageCount) {
						for (int i = 0; i < P_pageCount; i++) {
				%>
							<a class="<%=pageNo == (i + 1) ? "current" : ""%>" href="groupController.do?thread&ard=<%=ard%>&page=<%=(i + 1)%>"><%=(i + 1)%></a>
				<%
						} 
					} else {
						int pindex = 0;
						if (pageNo > (showPages / 2))
							pindex = pageNo - (showPages / 2);
						if ((pageNo > P_pageCount - (showPages / 2)) && (pageNo <= P_pageCount))
							pindex = P_pageCount - showPages;
						for (int i = pindex; i < showPages + pindex; i++) {
				%>
						<a class="<%=pageNo == (i + 1) ? "current" : ""%>" href="groupController.do?thread&ard=<%=ard%>&page=<%=(i + 1)%>"><%=(i + 1)%></a>
				<%}%>
					<a href="groupController.do?thread&ard=<%=ard%>&page=<%=P_pageCount %>" class="last">... <%=P_pageCount %></a> 
				<%}%> 
				<label>
					<input type="text" name="custompage" class="px" size="2" title="输入页码，按回车快速跳转" value="1">
					<span title="共 <%=P_pageCount %>页"> / <%=P_pageCount %>页</span>
				</label> 
				<a href="groupController.do?thread&ard=<%=ard %>&page=<%=(pageNo + 1)%>" class="nxt">下一页</a> 
			</div>
		</div>
	</div>
 
	<div id="f_pst" class="bm" style="width: 960px; margin: 0 auto;border:0px;"> 
		<div class="bm_c" style="overflow: hidden;"> 
				<div class="cl" style="float:left;width:240px;">  
					广告列表
				</div> 
				<div class="cl" style="margin-left: 5px;width:695px;float:right;"> 
						<div class="tedt" style="width:100%;border:0px;margin-bottom: 10px;">
							  <script type="text/plain" id="myEditor" style="width:100%;height:200px;"></script>
						</div>  
					<button onclick="sendArticle(${item.user_id})" id="subArticle" style="font-size:12px;font-weight: bold;color:white;background-color: #0090ee;height:30px;line-height: 30px;border:0px;">发表帖子</button>
				</div> 
		</div>
	</div> 
	<!-- 评论回复 -->
	<div id="dialog-form" style="width:600px;height:200px;"> 
			<span id="div_title">RE: ${article.title}</span>
			<div class="quote">这里我可以写一些输入提示</div>  
			<iframe id="iframeID" frameborder=0 width="100%" height="250" marginheight=0 marginwidth=0 scrolling=no src="groupController.do?groupDemo"></iframe>	
		  
	</div>
	<!-- 评分 -->
	<div class="tanchu_sj1"> 
	<form action="post" id="form_score">
	  <table width="100%" border="0" cellpadding="1" cellspacing="0">
	  <tbody>
	  	<tr bgcolor="#f2f2f2">
	    <td width="25%" style=" border-top:1px solid #ccc">&nbsp;</td>
	    <td width="25%" style=" border-top:1px solid #ccc">&nbsp;</td>
	    <td style=" border-top:1px solid #ccc">评分区间</td>
	    <td style=" border-top:1px solid #ccc">今日剩余</td>
	  </tr>
	  <tr>
	    <td width="25%">经验</td>
	    <td width="25%">
	    	<select style=" width:50px; color:#666" name="score1">
	    		<option>0</option>
	    		<option>1</option> 
	    	</select></td>
	    <td>0~1</td>
	    <td>2</td>
	  </tr>
	  <tr>
	    <td width="25%">威望</td>
	    <td width="25%">
	    	<select style=" width:50px; color:#666" name="score2">
	    		<option>0</option>
	    		<option>1</option>
	    		<option>2</option>
	    	</select></td>
	    <td>0~1</td>
	    <td>2</td>
	  </tr>
	  <tr>
	    <td width="25%">魅力</td>
	    <td width="25%">
	    	<select style=" width:50px; color:#666" name="score3">
	    		<option>0</option>
	    		<option>1</option> 
	    	</select></td>
	    <td>0~1</td>
	    <td>2</td>
	  </tr>
	  <tr>
	    <td width="25%">贡献</td>
	    <td width="25%">
	    	<select style=" width:50px; color:#666" name="score4">
	    		<option>0</option>
	    		<option>1</option> 
	    	</select></td>
	    <td>0~1</td>
	    <td>2</td>
	  </tr>
	  <tr>
	    <td width="25%"><img src="imges/jindou.gif" style=" vertical-align:middle">金豆</td>
	    <td width="25%">
	    	<select style=" width:50px; color:#666" name="score5">
	    		<option>1000</option>
	    		<option>900</option>
	    		<option>800</option>
	    		<option>700</option>
	    		<option>600</option>
	    		<option>500</option>
	    		<option>400</option>
	    		<option>300</option>
	    		<option>200</option>
	    		<option>100</option>
	    	</select></td>
	    <td>0~1000</td>
	    <td>3</td>
	  </tr>
	  <tr><td rowspan="4" style=" border:none">可选评分理由 :</td></tr>
	  </tbody></table></form> 
	  <div id="scroll_tanchu"> 
	    	<a class="ly_cls" href="javascript:getThisText(0)" id="item_0">预测准确，谢谢！</a>
	    	<a class="ly_cls" href="javascript:getThisText(1)" id="item_1">谢谢反馈</a>
	    	<a class="ly_cls" href="javascript:getThisText(2)" id="item_2">表示支持！</a>
	    	<a class="ly_cls" href="javascript:getThisText(3)" id="item_3">我很赞同！</a>
	    	<a class="ly_cls" href="javascript:getThisText(4)" id="item_4">辛苦了！</a>
	    	<a class="ly_cls" href="javascript:getThisText(5)" id="item_5">举报奖励！</a>
	    	<a class="ly_cls" href="javascript:getThisText(6)" id="item_6">很给力！</a>
	    	<a class="ly_cls" href="javascript:getThisText(7)" id="item_7">神马都是浮云！</a>
	    	<a class="ly_cls" href="javascript:getThisText(8)" id="item_8">赞一个！</a>
	    	<a class="ly_cls" href="javascript:getThisText(9)" id="item_9">山寨</a>
	    	<a class="ly_cls" href="javascript:getThisText(10)" id="item_10">淡定</a>
	    	<a class="ly_cls" href="javascript:getThisText(11)" id="item_11">反对！</a>
	    	<a class="ly_cls" href="javascript:getThisText(12)" id="item_12">警告！</a>
	  </div>
	  <div style="width:100%;margin-top:5px;">
	  	<input style=" width:99%; height:23px;" type="text" id="reason" name="reason"></div>
	  <div style="width:100%;margin-top:5px;color:#666">评分扣除自身相应积分</div> 
	   <div style="clear:both"></div>   
	 </div> 
	 <!-- 举报 -->
	 <div id="div_jubao_win">
	 	<p>请点击举报理由</p>
	 	<p class="mtn mbn" id="report_reasons"></p>
	 	<div id="report_other">
			<textarea id="report_message" name="message" class="reasonarea pt mtn" style="height:60px;width:320px;" onkeyup="strLenCalc()"></textarea>		
		</div>
		<div id="report_msg">还可输入<strong id="checklen">200</strong>个字符</div>
	 </div>
	<div style="clear: both"></div> 
</div>

<!--foot -->
<%@include file="foot.jsp"%>

</body>
</html>
<script type="text/javascript">
//实例化编辑器
//var um = UM.getEditor('myEditor2');//全部工具栏
var um = UM.getEditor('myEditor',{ //设置攻击力
    toolbar:  
        ['bold italic underline fullscreen', 'link unlink','| justifyleft justifycenter justifyright justifyjustify |', 'emotion'] 
     
});  
$("#dialog-form").hide(); 
$(".tanchu_sj1").hide();
$("#div_jubao_win").hide();
$("#report_other").hide();

function sendArticle(recv_id){  
	var text=UM.getEditor('myEditor').getContent(); 
	if(text==null || text==""){
		$.dialog.alert("帖子内容不能为空");
		return;
	}   
	$("#subArticle").css({"enabled":"none"});
	$.ajax({
		async : false,
		cache : false,
		type : 'POST',
		url : 'groupController.do?replayComment',// 请求的action路径
		data : {group_sid:$("#group_sid").val(),gid:$("#group_id").val(),ard:$("#art_id").val(),text:text,recv_id:recv_id},
		error : function() {// 请求失败处理函数
			unloading(); 
			$.dialog.alert("提交出错了，请重试！");
		},
		beforeSend: function () {
			loading("提交中...", 1);
		},
		success : function(data) { 
			unloading(); 
			var d = $.parseJSON(data);
			if (d.success) {  
				var article=d.obj; 
				appendHtml(article);  
				UM.getEditor('myEditor').setContent("");
				//$.dialog.alert(d.msg); 
			}else{
				$.dialog.alert(d.msg); 
			}
		}
	});
}
function qkreplay(aid,recv_id){
	var vmsg=$("#vmessage").val();
	if(vmsg==null || vmsg==""){
		$.dialog.alert("回复内容不能为空");
		return;
	}
	$("#replysubmit").css({"enabled":"none"});
	$.ajax({
		async : false,
		cache : false,
		type : 'POST',
		url : 'groupController.do?replayComment',// 请求的action路径
		data : {group_sid:$("#group_sid").val(),gid:$("#group_id").val(),ard:aid,text:vmsg,recv_id:recv_id},
		error : function() {// 请求失败处理函数
			unloading(); 
			$.dialog.alert("提交出错了，请重试！");
		},
		beforeSend: function () {
			loading("提交中...", 1);
		},
		success : function(data) { 
			unloading(); 
			var d = $.parseJSON(data);
			if (d.success) {  
				var article=d.obj; 
				$("#vmessage").val("");
				appendHtml(article);  
			}else{
				$.dialog.alert(d.msg); 
			}
		}
	});
}
function replayWin(aid,recv_id){ 
	var user_name="span_article_username_"+aid;
	var user_time="span_article_createdate_"+aid;
	var text="div_article_content_"+aid;
	
	var html='<div class="quote"><blockquote>';
		html+='<font size="2"><a href="http://bbs.china95.net/forum.php?mod=redirect&amp;goto=findpost&amp;pid=25665210&amp;ptid=2841592" target="_blank">';
		html+='<font color="#999999" id="win_user_time">'+$("#"+user_name).html()+' 发表于 '+$("#"+user_time).html()+'</font></a></font>';
		html+='<br>'+$("#"+text).html();
		html+='</blockquote></div>';
		
	$(".quote").html(html);
	  
	$("#dialog-form").dialog({
	    autoOpen: true,
	    title:"回复",
	    //height: auto,
	    width: 625,
	    modal: true,
	    buttons: {
	      "确定": function() {  
			var text=$("#iframeID")[0].contentWindow.getReplayContext();  
			if(text==null || text==""){
				$.dialog.alert("帖子内容不能为空");
				return;
			}    
			text=html+text;
			$.ajax({
				async : false,
				cache : false,
				type : 'POST',
				url : 'groupController.do?replayComment',// 请求的action路径
				data : {group_sid:$("#group_sid").val(),gid:$("#group_id").val(),ard:$("#art_id").val(),text:text,recv_id:recv_id},
				error : function() {// 请求失败处理函数
					unloading(); 
					$.dialog.alert("提交出错了，请重试！");
				},
				beforeSend: function () {
					loading("提交中...", 1);
				},
				success : function(data) { 
					unloading();  
					var d = $.parseJSON(data);
					if (d.success) {   
						var article=d.obj;
						appendHtml(article); 
				        $("#dialog-form").dialog("close");
					}else{
						$.dialog.alert(d.msg); 
					}
				}
			});
	      },
	      "取消": function() {
	        $("#dialog-form").dialog("close");
	      }
	    },
	    close: function() {
	     // allFields.val( "" ).removeClass( "ui-state-error" );
	    }
	  }); 
	
	//$("#dialog-form").dialog("open");
}

function appendHtml(article){ 
	var html='<div class="yxyj_l_content">';
	html+='<table class="plhin" cellspacing="0" cellpadding="0" id="plhin_'+article.id+'">';
	html+='<tbody>';
	html+='<tr>';
	html+='<td class="pls" rowspan="2">';
	html+=' <div class="pi"><a href="" class="xw1">'+article.user_name+'</a><img src="imges/v1.jpg" style=" vertical-align:middle"></div>';
	html+='<div class="avatar"><a href="" class="avtm"><img src="imges/touxiang.png"></a></div>';
	html+='<div class="tns xg2">';
	html+='<table cellspacing="0" cellpadding="0" width="100%">';
	html+='<tbody>';
	html+='<tr>';
	html+='<th><p><a href="" class="xi3">'+article.release_num+'</a></p>主题</th>';
	html+='<th><p><a href="" class="xi3">'+article.comments_num+'</a></p>帖子</th>';
	html+='<td><p><a href="" class="xi3">'+article.integral+'</a></p>积分</td>';
	html+='</tr>';
	html+='</tbody>';
	html+='</table>';
	html+='</div>';
	html+='<p><em><a href="">功勋管理员</a></em></p>';
	html+='<p>';
	html+='<span>';
	html+='<img src="imges/star_level3.gif"><img src="imges/star_level3.gif"><img src="imges/star_level3.gif">';
	html+='<img src="imges/star_level3.gif"><img src="imges/star_level2.gif"><img src="imges/star_level1.gif">';
	html+='</span>';
	html+='</p>';
	html+='<p><span class="pbg2"><span class="pbr2" style="width:16%;"></span></span></p>';
	html+='<dl class="pil cl">';
	html+='<dt>积分</dt><dd>'+article.integral+'</dd>';
	html+='<dt>威望</dt><dd>'+article.prestige+' 点</dd>';
	html+='<dt>魅力</dt><dd>'+article.charm+' 点</dd>';
	html+='<dt>贡献</dt><dd>'+article.contrbute+' 点</dd>';
	html+='<dt>易币</dt><dd>'+article.lunbi+' 元</dd>';
	html+='<dt><img style="vertical-align:middle" src="imges/jindou.gif"> 金豆</dt><dd>'+article.jindou+' 枚</dd>';
	html+='<dt><img style="vertical-align:middle" src="imges/money.gif"> 现金</dt><dd>'+article.cash+' 元</dd>  ';
	html+='</dl>';
	html+='<p class="md_ctrl">';
	html+='<a href=""><img src="imges/medal2.gif"><img src="imges/medal3.gif"><img src="imges/medal9.gif">';
	html+='<img src="imges/medal11.gif"><img src="imges/medal12.gif"><img src="imges/boy.gif"><br>';
	html+='<img src="imges/jxry.gif"></a>';
	html+='</p>';
	html+='<ul class="xl xl2 o cl"><li class="pm2"><a href="#">发消息</a></li></ul>';
	html+='</td>';
	html+='<td class="plc">';
	html+='<div class="pi">';
	html+='<strong><a href="javascript:void(0)">'+article.cengshu+'楼</a></strong>';
	html+='<div class="pti">';
	html+='<div class="pdbt"></div>';
	html+='<div style="float:left">';
	html+='<img src="imges/ico_lz.png" class="authicn vm"><span id="span_article_username_'+article.id+'">'+article.user_name+'</span><span class="pipe">|</span><em>发表于<span id="span_article_createdate_'+article.id+'">'+article.create_date+'</span></em>';
	html+='<span class="pipe">|</span><a href="">只看该作者</a>';
	html+='</div>';
	html+=' </div>';
	html+='</div>';
	html+='<div class="pct">';
	html+='<div class="a_pt"><a href=""><font color="#FF0000">[普劝称赞圣号]</font><font color="#FF6600"><b>南无宝月智严光!</b></font></a></div>';
	html+='<div class="pcb">';
	html+='<div class="t_fsz">';
	html+='<table cellspacing="0" cellpadding="0" width="100%">';
	html+='<tbody>';
	html+='<tr>';
	html+='<td class="t_f">';
	//html+='<div class="a_pr"><a href=""><img src="imges/200928gvhzhgnmzfagf0zo.jpg" height="600" width="160" border="0"></a></div>';
	html+='<div id="div_article_content_id">';
	html+=article.content;
	html+='</div>';
	html+='</td>';
	html+='</tr>';
	html+='</tbody>';
	html+='</table>';
	html+='</div>';
	html+='</div>';
	html+='</div>';
	html+='</td>';
	html+='</tr> ';
	html+='<tr>';
	html+='<td class="plc plm"> ';
	html+='<div class="sign" style="max-height:100px;maxHeightIE:100px;">';
	html+='<font color="Red"><strong>职业...算命...风水...起名...择日...解灾.............QQ：1532312074</strong></font>';
	html+='</div> ';
	html+='<div class="a_pb">';
	html+='<a href=""><font color="#FF0000">[普劝称赞圣号]</font><font color="#FF6600"><b>南无极乐世界阿弥陀佛！</b></font></a>';
	html+='</div>';
	html+='</td>';
	html+='</tr>';
	html+='<tr> </tr>';
	html+='<tr>';
	html+='<td class="pls"></td>';
	html+='<td class="plc" style="overflow:visible;">';
	html+='<div class="po hin">';
	html+='<div class="pob cl">';
	html+='<em><a class="fastre" href="javascript:replayWin(\''+article.id+'\','+article.user_id+')">回复</a>';
	html+='<a class="replyadd" href="javascript:replayZc("support",\''+article.id+'\','+article.user_id+')">支持</a>';
	html+='<a class="replysubtract" href="javascript:replayZc("against",\''+article.id+'\','+article.user_id+')">反对</a>';
	html+='</em>';
	html+='<span><select class="showmenu"><option>使用道具</option><option>使用道具1</option><option>使用道具2</option></select>';
	html+='<a href="javascript:replayPfWin(\''+article.id+'\','+article.user_id+')">评分</a>';
	html+='<a href="javascript:replayJubao(\''+article.id+'\','+article.user_id+')">举报</a>';
	html+='</span>';
	html+='</div>';
	html+='</div>';
	html+='</td>';
	html+='</tr>';
	html+='</tbody>';
	html+='</table>';
	html+='</div>'; 
	$("#post_new").before(html); 
	//设置回复评论后，滚动条自动往下走
	var vh=$(".yxyj").height(); 
	var setHg=parseInt(vh)-500;
	$("html,body").animate({"scrollTop": setHg}, 500); 
}
//支持，反对，分享，收藏
function replayZc(action,aid,recid){
	$.ajax({
		async : false,
		cache : false,
		type : 'POST',
		url : 'groupController.do?replayAction',// 请求的action路径
		data : {ard:aid,action:action,title:$("#span_article_title").html(),recv_id:recid},
		error : function() {// 请求失败处理函数
			unloading(); 
			$.dialog.alert("提交出错了，请重试！");
		},
		beforeSend: function () {
			loading("提交中...", 1);
		},
		success : function(data) { 
			unloading();  
			var d = $.parseJSON(data);
			if(d.success){
				var sp_id="#sp_"+action+"_num_"+aid;
				var oldAccount=$(sp_id).html();
				$(sp_id).html(parseInt(oldAccount)+1);
			}
			$.dialog.alert(d.msg);  
		}
	});
}
//评分
function replayPfWin(aid,recid){  
	$(".tanchu_sj1").dialog({
	    autoOpen: true,
	    title:"评分",
	    //height: auto,
	    width: 625,
	    modal: true,
	    buttons: {
	      "确定": function() {  
			//获取评分设置的信息
			var param=$("#form_score").serialize();
			var reason=$("#reason").val();
			if(reason==null || reason==""){
				$.dialog.alert("请选择可选评分理由！");
				return;
			}  
			param=param+"&ard="+$("#art_id").val()+"&recv_id="+recid+"&title="+$("#span_article_title").html()+"&reason="+reason+"&articleid="+aid;
			$.ajax({
				async : false,
				cache : false,
				type : 'POST',
				url : 'groupController.do?replayPinfen',// 请求的action路径
				data : param,
				error : function() {// 请求失败处理函数
					unloading(); 
					$.dialog.alert("提交出错了，请重试！");
				},
				beforeSend: function () {
					loading("提交中...", 1);
				},
				success : function(data) { 
					unloading();   
					var d = $.parseJSON(data);
					if (d.success) { 
						debugger;
						appendPfHtml(aid,d.obj,0);
					    $(".tanchu_sj1").dialog( "close" );
					}else{
						$.dialog.alert(d.msg); 
					}
				}
			});
	      },
	      "取消": function() {
	        $(".tanchu_sj1").dialog( "close" );
	      }
	    },
	    close: function() { 
	    }
	  });
}
function appendPfHtml(aid,pflist,num){ 
	$(".cls_pf_"+aid).html("");
	var cyrs=pflist.length,jy=0,ww=0,ml=0,gx=0,jd=0;
	for(var i=0;i<pflist.length;i++){
		jy=parseInt(jy)+parseInt(pflist[i].experience);
		ww=parseInt(ww)+parseInt(pflist[i].prestige);
		ml=parseInt(ml)+parseInt(pflist[i].charm);
		gx=parseInt(gx)+parseInt(pflist[i].contribution);
		jd=parseInt(jd)+parseInt(pflist[i].jindou);
	}
    var html='<h3 class="psth xs1"><span class="icon_ring vm"></span>评分</h3>';
    html+='<dl class="rate">';
    html+='<dd style="margin:0"> ';
    html+='<table class="ratl">';
    html+='<tbody>';
    html+='<tr>';
    html+='<th class="xw1" width="120">参与人数 <span class="xi1">'+cyrs+'</span></th>';
    html+='<th class="xw1" width="70">经验 <i><span class="xi1">+'+jy+'</span></i></th>';
    html+='<th class="xw1" width="70">威望 <i><span class="xi1">+'+ww+'</span></i></th>';
    html+='<th class="xw1" width="70">魅力 <i><span class="xi1">+'+ml+'</span></i></th>';
    html+='<th class="xw1" width="70">贡献 <i><span class="xi1">+'+gx+'</span></i></th>';
    html+='<th class="xw1" width="70">金豆 <i><span class="xi1">+'+jd+'</span></i></th>';
    html+='<th width="200"><i class="txt_h">理由</i></th>';
    html+='</tr>';
    html+='</tbody>';
    html+='<tbody class="ratl_l">';
    
    var exp="",pre="",cha="",con="",jin="";
    if(cyrs>5 && num==0)
    	cyrs=5; 
    for(var i=0;i<cyrs;i++){
	    html+='<tr id="rate_'+pflist[i].id+'_'+pflist[i].user_id+'">';//headerimg
	    html+='<td><a href=""><img src="imges/56_avatar_small.jpg"></a> <a href="">'+pflist[i].user_name+'</a></td>'; 
	    if(parseInt(pflist[i].experience)>0)
	    	exp=" + "+pflist[i].experience;
	    else
	    	exp="";
	    html+='<td class="xi1">'+exp +'</td>';
	    if(parseInt(pflist[i].prestige)>0)
	    	pre=" + "+pflist[i].prestige;
	    else
	    	pre="";
	    html+='<td class="xg1">'+pre +'</td>';
	    if(parseInt(pflist[i].charm)>0)
	    	cha=" + "+pflist[i].charm;
	    else
	    	cha="";
	    html+='<td class="xg1">'+cha +'</td>';
	    if(parseInt(pflist[i].contribution)>0)
	    	con=" + "+pflist[i].contribution;
	    else
	    	con="";
	    html+='<td class="xg1">'+con +'</td>';
	    if(parseInt(pflist[i].jindou)>0)
	    	jin=" + "+pflist[i].jindou;
	    else
	    	jin="";
	    html+='<td class="xg1">'+jin +'</td>';
	    html+='<td class="xg1">'+pflist[i].reason+'</td>';
	    html+='</tr>';
    }
    html+='</tbody>';
    html+='</table>';
    if(cyrs>5 && num==0){
    	html+='<p class="ratc"><a href="javascript:showAllPf(\''+aid+'\')" title="查看全部评分">查看全部评分</a></p>';
    }
    html+='</dd>';
    html+='</dl></div>'; 
    $(".cls_pf_"+aid).html(html);
}
function showAllPf(aid){
	$.ajax({
		async : false,
		cache : false,
		type : 'POST',
		url : 'groupController.do?getPinfenList',// 请求的action路径
		data : {articleId:aid},
		error : function() {// 请求失败处理函数
			unloading(); 
			$.dialog.alert("加载出错了，请重试！");
		},
		beforeSend: function () {
			loading("加载中...", 1);
		},
		success : function(data) { 
			unloading();   
			var d = $.parseJSON(data);
			appendPfHtml(aid,d.obj,9);
		}
	});
}
//举报
function replayJubao(aid,recid){ 
	$("#div_jubao_win").dialog({
	    autoOpen: true,
	    title:"举报",
	    //height: auto,
	    width: 360,
	    modal: true,
	    buttons: {
	      "确定": function() {   
	    	  var val=$('input:radio[name="report_select"]:checked').val();
	          if(val==null){
	            	$.dialog.alert("请选中一个举报理由！"); 
	                return false;
	          }
	          var report_message="";
	          if(val=="其他"){
	        	  report_message=$("#report_message").val();
	        	  if(report_message==null || report_message==""){
	        		  $.dialog.alert("请输入其他理由！"); 
	        		  return false;
	        	  }
	          }else{
	        	  report_message=val;
	          }
	              
			var param="ard="+$("#art_id").val()+"&recv_id="+recid+"&title="+$("#span_article_title").html()+"&reason="+report_message+"&articleid="+aid;
			$.ajax({
				async : false,
				cache : false,
				type : 'POST',
				url : 'groupController.do?replayJuBao',// 请求的action路径
				data : param,
				error : function() {// 请求失败处理函数
					unloading(); 
					$.dialog.alert("提交出错了，请重试！");
				},
				beforeSend: function () {
					loading("提交中...", 1);
				},
				success : function(data) { 
					unloading();   
					var d = $.parseJSON(data);
					$.dialog.alert(d.msg); 
					$("#div_jubao_win").dialog( "close" );
				}
			});
	      },
	      "取消": function() {
	        $("#div_jubao_win").dialog( "close" );
	      }
	    },
	    close: function() { 
	    }
	  });
}

var reasons = ['广告垃圾','违规内容','恶意灌水','重复发帖','其他'];
$(function(){ 
	$("#scroll_tanchu").hover(function(){ 
		$("#scroll_tanchu").height(290);
	}, function(){
		$("#scroll_tanchu").height(150);
	}); 
	
	var reasonstring = '';
	for (var i=0; i<reasons.length; i++) {
		reasonstring += '<label><input type="radio" name="report_select" class="pr" id="rbtn_'+i+'" onclick="rbtnClk('+i+')" value="' + reasons[i] + '"> ' + reasons[i] + '</label><br />';
	}
	$("#report_reasons").html(reasonstring);
});
function rbtnClk(n){
	if(n==4){
		$("#report_other").show();
	}else{
		$("#report_other").hide();
	}
}
function strLenCalc(){
	var val=$("#report_message").val();  
	$("#checklen").html(200-parseInt(val.length));
}
function getThisText(n){
	var gid="#item_"+n; 
	$("#reason").val($(gid).html()); 
} 
	
</script>